//package com.example.recordingpen_datacollection;
//
//import okhttp3.*;
//import org.junit.jupiter.api.Test;
//
//import java.io.IOException;
//import java.util.concurrent.TimeUnit;
//
//public class ERNIEBotTurboExample {
//    private static final String API_URL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant"; // 替换为实际的API URL
//    private static final String API_TOKEN = "24.6b0e31372e9e12bce301136647a58b44.2592000.1711597635.282335-38076635";
//
//    // 替换为你的API Token
//    public static void main(String[] args) {
//        OkHttpClient client = new OkHttpClient.Builder().connectTimeout(10, TimeUnit.SECONDS).writeTimeout(10, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
//        MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
//        RequestBody body = RequestBody.create(mediaType, "{\"input_text\":\"你好，请问今天的天气如何？\"}");
//        Request request = new Request.Builder()
//                .url(API_URL)
//                .post(body)
//                .addHeader("Authorization", "Bearer " + API_TOKEN)
//                .addHeader("Content-Type", "application/json")
//                .build();
//        try (Response response = client.newCall(request).execute()) {
//            if (!response.isSuccessful()) {
//                throw new IOException("Unexpected code " + response);
//            } else { // 请求成功，处理响应
//                String responseBody = response.body().string();
//                System.out.println(responseBody);
//            }
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }
//
//    @Test
//    public void dome() throws IOException {
//        String url = "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=zU5iYU4w8EfGdENAfnVs3eMA&client_secret=sIwsuEPNrISpcLpzqGBEQEV084kwgxtz";
//         OkHttpClient client = new OkHttpClient();
//            Request request = new Request.Builder()
//                    .url(url)
//                    .build();
//
//            try (Response response = client.newCall(request).execute()) {
//                System.out.println(response.body().string());
//
//
//            }
//        //"{"refresh_token":"25.c5e16341d4ace67c2828341510411652.315360000.2024371578.282335-38076635",
//        // "expires_in":2592000,
//        // "session_key":"9mzdWu7YqgaEyYD6UW7xVl2SmJTgSFpu\/D9MwlAUsl2++ic9wBazy8NVbunI2VNQzbmL\/cPwg4kUzz0ngmigxtUYMk+fNw==",
//        // "access_token":"24.a29070dfdc99c70c58e82a602dd8cac5.2592000.1711603578.282335-38076635",
//        // "scope":"ai_custom_yiyan_com_ernie_35_8k_1222 ai_custom_yiyan_com_ernie_35_8k_0205 ai_custom_yiyan_com_ernie_35_4k_0205 ai_custom_yiyan_com_eb_turbo_pro ai_custom_yiyan_com_tokenizer_eb ai_custom_yiyan_com_mixtral_8x7b ai_custom_yiyan_com_emb_tao_8k ai_custom_yiyan_com_yi_34b ai_custom_yiyan_com_eb_pro ai_custom_yiyan_com_chatlaw ai_custom_yiyan_com_xuanyuan_70b_chat ai_custom_yiyan_com_codellama_7b_ins ai_custom_yiyan_com_sqlcoder_7b ai_custom_yiyan_com_qf_chinese_llama_2_13b ai_custom_yiyan_com_8k ai_custom_yiyan_com_ai_apaas ai_custom_yiyan_com_sd_xl public brain_all_scope ai_custom_yiyan_com ai_custom_yiyan_com_eb_instant wenxinworkshop_mgr ai_custom_yiyan_com_bloomz7b1 ai_custom_yiyan_com_emb_text wise_adapt lebo_resource_base lightservice_public hetu_basic lightcms_map_poi kaidian_kaidian ApsMisTest_Test\u6743\u9650 vis-classify_flower lpq_\u5f00\u653e cop_helloScope ApsMis_fangdi_permission smartapp_snsapi_base smartapp_mapp_dev_manage iop_autocar oauth_tp_app smartapp_smart_game_openapi oauth_sessionkey smartapp_swanid_verify smartapp_opensource_openapi smartapp_opensource_recapi fake_face_detect_\u5f00\u653eScope vis-ocr_\u865a\u62df\u4eba\u7269\u52a9\u7406 idl-video_\u865a\u62df\u4eba\u7269\u52a9\u7406 smartapp_component smartapp_search_plugin avatar_video_test b2b_tp_openapi b2b_tp_openapi_online smartapp_gov_aladin_to_xcx",
//        // "session_secret":"bd9edb8bdc65a3ad8c3f4cf1731810c4"}"
//
//    }
//}